package com.dayuanit.dy16.atm.boatm.mapper;

import com.dayuanit.dy16.atm.boatm.entity.BoRole;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface BoRoleMapper {
    int deleteByPrimaryKey(Long id);

    int insert(BoRole record);

    int insertSelective(BoRole record);

    BoRole selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(BoRole record);

    int updateByPrimaryKey(BoRole record);

    BoRole getByName(String roleName);

    void saveUserRole(@Param("userId") Long userId, @Param("roleId") Long roleId);

    void delUserRole(@Param("userId") Long userId, @Param("roleId") Long roleId);

    List<BoRole> listRoles();

    List<BoRole> listUserRoles(String username);

    int delUserRoles(Long userId);

}